package com.monlyu.action.firm;

import com.monlyu.action.PageAction;
import com.monlyu.bean.Pages;
import com.monlyu.bo.FirmBo;
import com.monlyu.vo.Firm;

/********************************************************************************
 * 
 * <b>功能描述☞</b><br>
 * 
 * <b>开发公司☞</b>重庆唯尼科技有限公司<br>
 * <b>版权☞</b>本文件归重庆唯尼科技有限公司所有<br>
 * <b>项目名☞</b>NewsSys<br>
 * <b>文件路径☞</b>com.monlyu.action.firm.ListFirmAction.java<br>
 * <b>开发日期☞</b>2010-2-10 <br>
 * 
 * @author zengjun
 * @since JDK 5
 * @version 1.0.8
 * 
 ********************************************************************************/
public class ListFirmAction extends PageAction {

	private Pages<Firm> firms;

	private Firm firm;

	private FirmBo firmBo;

	public Firm getFirm() {
		return firm;
	}

	public void setFirm(Firm firm) {
		this.firm = firm;
	}

	public String execute() {
		firms = firmBo.getFirms(getDefPage());
		return view("firmList.jsp");
	}
	
	public String toSearch() {
		return view("searchFirm.jsp");
	}
	
	public String search() {
		firms = firmBo.search(getDefPage(),firm);
		return view("searchFirm.jsp");
	}

	public Pages<Firm> getFirms() {
		return firms;
	}

	public void setFirmBo(FirmBo firmBo) {
		this.firmBo = firmBo;
	}
}
